<template>
	<view class="info_top">
		<view class="w-690 info-bg-title" style="height: 265rpx;">
			<view class="left-balck d-flex align-items">
				<image src="../static/back@1x.png" @click="go_black" mode="widthFix" class="go_back"></image>
				<view class="line"></view>
				<image src="../static/home@1x.png" @click="goHome" mode="widthFix" class="go_index"></image>
			</view>
			<view class="title">信息发布</view>
			<view class="right"></view>
		</view>
		<view class="w-690 content-list">
			<view class="w-650 d-flex margin-top-30" v-show="option.show_type_info == 1 ? false : true">
				<view class="fabu_title">发布类型</view>
				<view class="radio_list">
					<u-radio-group v-model="radiovalue1" placement="row">
						<u-radio activeColor="#FF6400" labelSize="26rpx"
							:customStyle="{marginLeft: '15rpx',marginRight:'50rpx',marginBottom:'20rpx',fontSize:'20rpx'}"
							v-for="(item, index) in radiolist1" :key="index" :label="item.name" :name="item.id"
							@change="radioChange(index)">
						</u-radio>
					</u-radio-group>
				</view>
			</view>
			<view class="w-650 d-flex align-items margin-top-30"
				v-if="radiovalue1 == 1 || radiovalue1 == 2 || radiovalue1 == 6 || radiovalue1 == 7 || radiovalue1 == 8 || radiovalue1 == 9">
				<view class="fabu_title" v-if="radiovalue1 == 1 || radiovalue1 == 2">所在城市</view>
				<view class="fabu_title"
					v-if="radiovalue1 == 6 || radiovalue1 == 7 || radiovalue1 == 8 || radiovalue1 == 9">城市选择</view>
				<view class="righttx d-flex align-items" @click="chooseCity">
					<view :class="adress == '请选择省/市/县' ? 'top-txt_true' : 'choose_top-txt_true'">{{adress}}</view>
					<image class="qm" src="../static/right.png" mode="widthFix"></image>
				</view>
			</view>
			<view class="w-650 d-flex align-items margin-top-30"
				v-if="radiovalue1 == 6 || radiovalue1 == 7 || radiovalue1 == 8 || radiovalue1 == 9">
				<view class="fabu_title">户型选择</view>
				<view class="righttx d-flex align-items" @click="choose_huxing">
					<view :class="huxing_txt == '请选择' ? 'top-txt_true' : 'choose_top-txt_true'">{{huxing_txt}}</view>
					<image class="qm" src="../static/right.png" mode="widthFix"></image>
				</view>
			</view>
			<view class="w-650 d-flex align-items margin-top-30"
				v-if="radiovalue1 == 6 || radiovalue1 == 7 || radiovalue1 == 8 || radiovalue1 == 9">
				<view class="fabu_title">设计风格</view>
				<view class="righttx d-flex align-items" @click="showFengge = true">
					<view :class="sheji_txt == '请选择' ? 'top-txt_true' : 'choose_top-txt_true'">{{sheji_txt}}</view>
					<image class="qm" src="../static/right.png" mode="widthFix"></image>
				</view>
			</view>
			<view class="w-650 margin-top-30 d-flex align-items justify-content-space-between"
				v-if="radiovalue1 == 1 || radiovalue1 == 5  || radiovalue1 == 7 || radiovalue1 == 9">
				<view class="d-flex align-items">
					<view class="cs">输入面宽</view>
					<input type="text" class="miankuan" v-model="miankuan" />
					<view class="cs">米</view>
				</view>
				<view class="d-flex align-items">
					<view class="cs">输入进深</view>
					<input type="text" class="miankuan" v-model="jinshen" />
					<view class="cs">米</view>
				</view>
			</view>
			<view class="w-650 margin-top-30 d-flex align-items justify-content-space-between" v-if="radiovalue1 == 1">
				<view class="d-flex align-items">
					<view class="cs">扣除庭院</view>
					<input type="text" class="miankuan" v-model="tingyuan" />
					<view class="cs">m²</view>
				</view>
				<view class="d-flex align-items">
					<view class="cs">露台扣除</view>
					<input type="text" class="miankuan" v-model="lutai" />
					<view class="cs">m²</view>
				</view>
			</view>
			<view class="w-650 margin-top-30 d-flex align-items justify-content-space-between"
				v-if="radiovalue1 == 1 || radiovalue1 == 7 || radiovalue1 == 9">
				<view class="d-flex align-items">
					<view class="cs">结构形式</view>
					<view class="jiegou">
						<uni-data-select v-model="value_jiegou" :localdata="jiegou_range" @change="jiegou_change"
							:clear="false"></uni-data-select>
					</view>
				</view>
				<view class="d-flex align-items">
					<view class="cs">屋顶形式</view>
					<view class="jiegou">
						<uni-data-select v-model="value_wuding" :localdata="wuding_range" @change="wuding_change"
							:clear="false"></uni-data-select>
					</view>
				</view>
			</view>
			<view class="w-650 margin-top-30 d-flex align-items justify-content-space-between"
				v-if="radiovalue1 == 1 || radiovalue1 == 7 || radiovalue1 == 9">
				<view class="d-flex align-items">
					<view class="cs">地上层数</view>
					<input type="text" class="miankuan" v-model="cengshu" />
					<view class="cs">层</view>
				</view>
				<view class="d-flex align-items">
					<view class="cs">地下室</view>
					<view class="jiegou">
						<uni-data-select v-model="dixiashi_value" :localdata="dixiashi_range" @change="dixiashi_change"
							:clear="false"></uni-data-select>
					</view>
				</view>
			</view>
			<view class="w-650 margin-top-30 d-flex align-items" v-if="radiovalue1 == 2">
				<view class="cs">装修面积</view>
				<input type="text" class="mianji_w" v-model="zhuangxiu_mianji" />
				<view class="cs">m²</view>
			</view>
			<view class="w-650 d-flex align-items margin-top-30" v-if="radiovalue1 == 2">
				<view class="fabu_title">装修时间</view>
				<view class="righttx d-flex align-items">
					<uni-datetime-picker type="date" v-model="single" @change="change_time" />
				</view>
			</view>
			<view class="w-650 margin-top-30 d-flex align-items justify-content-space-between"
				v-if="radiovalue1 == 6 || radiovalue1 == 5 || radiovalue1 == 7 || radiovalue1 == 8 || radiovalue1 == 9">
				<view class="d-flex align-items">
					<view class="cs">房屋面积</view>
					<input type="text" class="miankuan" v-model="mianji" />
					<view class="cs">m²</view>
				</view>
				<view class="d-flex align-items" v-if="radiovalue1 == 6 || radiovalue1 == 7 || radiovalue1 == 8">
					<view class="cs">预算</view>
					<input type="text" class="miankuan" v-model="yusuan" />
					<view class="cs">万元</view>
				</view>
				<view class="d-flex align-items" v-if="radiovalue1 == 5 || radiovalue1 == 9">
					<view class="cs">造价</view>
					<input type="text" class="miankuan" v-model="zaojia" />
					<view class="cs">万元</view>
				</view>
			</view>

			<view class="w-650 d-flex align-items margin-top-30" v-if="radiovalue1 == 3">
				<view class="fabu_title">需要工种</view>
				<view class="righttx d-flex align-items" @click="show_gongzhong = true">
					<view :class="gongzhong == '请选择工种' ? 'top-txt_true' : 'choose_top-txt_true'">{{gongzhong}}</view>
					<image class="qm" src="../static/right.png" mode="widthFix"></image>
				</view>
			</view>
			<view class="w-650 margin-top-30 d-flex align-items justify-content-space-between" v-if="radiovalue1 == 3">
				<view class="d-flex align-items">
					<view class="cs">需要人数</view>
					<input type="text" class="miankuan" v-model="need_num" />
					<view class="cs">人</view>
				</view>
				<view class="d-flex align-items">
					<view class="cs">预计工期</view>
					<input type="text" class="miankuan" v-model="gongqi" />
					<view class="cs">天</view>
				</view>
			</view>
			<view class="w-650 d-flex align-items margin-top-30" v-if="radiovalue1 == 4">
				<view class="fabu_title">证件选择</view>
				<view class="righttx d-flex align-items" @click="show_card = true">
					<view :class="card_txt == '请选择证件种类' ? 'top-txt_true' : 'choose_top-txt_true'">{{card_txt}}</view>
					<image class="qm" src="../static/right.png" mode="widthFix"></image>
				</view>
			</view>
			<!-- 证件图片 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 4">
				<view class="fabu_title">证件图片</view>
				<view class="zhengjian">
					<u-upload width="127rpx" height="127rpx" :fileList="fileList1" @afterRead="afterRead"
						@delete="deletePic" name="1" multiple :maxCount="4">
						<image :src="src" class="shangchuanimg" v-if="avatar"></image>
						<image src="../static/upload.png" class="shangchuanimg" v-else></image>
					</u-upload>
				</view>
			</view>
			<view class="w-650 margin-top-30 d-flex align-items"
				v-if="radiovalue1 == 1 || radiovalue1 == 2 || radiovalue1 == 3 || radiovalue1 == 4">
				<view class="cs">手机号码</view>
				<view class="righttx">
					<input type="text" class="txt-phone" v-model="phone" />
				</view>
			</view>
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 1 || radiovalue1 == 3 || radiovalue1 == 4">
				<view class="cs">信息内容</view>
				<view class="">
					<textarea name="" v-model="info_content" class="xinxi_content" placeholder="请输入信息内容" id="" cols="30"
						rows="10"></textarea>
				</view>
			</view>
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 2">
				<view class="cs">备注</view>
				<view class="">
					<textarea name="" class="xinxi_content" v-model="beizhu_txt" placeholder="请输入备注信息" id="" cols="30"
						rows="10"></textarea>
				</view>
			</view>
			<!-- 材料类别 -->
			<view class="w-650 d-flex align-items margin-top-30" v-if="radiovalue1 == 10">
				<view class="fabu_title">材料类别</view>
				<view class="righttx d-flex align-items" @click="show_cailiao = true">
					<view :class="cailiao == '请选择' ? 'top-txt_true' : 'choose_top-txt_true'">{{cailiao}}</view>
					<image class="qm" src="../static/right.png" mode="widthFix"></image>
				</view>
			</view>
			<view class="w-650 margin-top-30 d-flex align-items" v-if="radiovalue1 == 10">
				<view class="cs">材料价格</view>
				<view class="righttx">
					<input type="text" class="txt-phone" v-model="cailiao_price" />
				</view>
			</view>
			<!-- 案例主图 -->
			<view class="w-650 margin-top-30"
				v-if="radiovalue1 == 6 || radiovalue1 == 5 || radiovalue1 == 7 || radiovalue1 == 8 || radiovalue1 == 9">
				<view class="fabu_title">案例主图 <text class="zhutu">（第一张图为封面图）</text> </view>
				<view class="zhengjian">
					<u-upload width="127rpx" height="127rpx" :fileList="fileList2" @afterRead="afterRead"
						@delete="deletePic" name="2" multiple :maxCount="4">
						<image :src="src" class="shangchuanimg" v-if="avatar"></image>
						<image src="../static/upload.png" class="shangchuanimg" v-else></image>
					</u-upload>
				</view>
			</view>
			<!-- 材料主图 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 10">
				<view class="fabu_title">材料主图 <text class="zhutu">（第一张图为封面图）</text> </view>
				<view class="zhengjian">
					<u-upload width="127rpx" height="127rpx" :fileList="fileList3" @afterRead="afterRead"
						@delete="deletePic" name="3" multiple :maxCount="4">
						<image :src="src" class="shangchuanimg" v-if="avatar"></image>
						<image src="../static/upload.png" class="shangchuanimg" v-else></image>
					</u-upload>
				</view>
			</view>
			<view class="w-650 margin-top-30"
				v-if="radiovalue1 == 6 || radiovalue1 == 5 || radiovalue1 == 7 || radiovalue1 == 8 || radiovalue1 == 9 || radiovalue1 == 10 || radiovalue1 == 12">
				<view class="cs">标题</view>
				<view class="">
					<textarea name="" class="xinxi_content" v-model="biaoti_txt" placeholder="请输入标题" id="" cols="30"
						rows="10"></textarea>
				</view>
			</view>
			<!-- 详情 -->
			<view class="w-650 margin-top-30"
				v-if="radiovalue1 == 6 || radiovalue1 == 5 || radiovalue1 == 7 || radiovalue1 == 8 || radiovalue1 == 10 || radiovalue1 == 12">
				<view class="fabu_title">详情</view>
				<view class="zhengjian">
					<u-upload width="127rpx" height="127rpx" :fileList="fileList4" @afterRead="afterRead"
						@delete="deletePic" name="4" multiple :maxCount="4">
						<image :src="src" class="shangchuanimg" v-if="avatar"></image>
						<image src="../static/upload.png" class="shangchuanimg" v-else></image>
					</u-upload>
				</view>
			</view>
			<view class="w-650 margin-top-30"
				v-if="radiovalue1 == 6  || radiovalue1 == 5 || radiovalue1 == 7 || radiovalue1 == 8 || radiovalue1 == 10 || radiovalue1 == 12">
				<view class="">
					<textarea name="" class="xinxi_content" v-model="detail_txt" placeholder="请输入详情" id="" cols="30"
						rows="10"></textarea>
				</view>
			</view>
			<!-- 项目简介 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 9">
				<view class="fabu_title">项目简介</view>
				<view class="zhengjian">
					<u-upload width="127rpx" height="127rpx" :fileList="fileList5" @afterRead="afterRead"
						@delete="deletePic" name="5" multiple :maxCount="4">
						<image :src="src" class="shangchuanimg" v-if="avatar"></image>
						<image src="../static/upload.png" class="shangchuanimg" v-else></image>
					</u-upload>
				</view>
			</view>
			<!-- 项目简介详情信息 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 9">
				<view class="">
					<textarea name="" class="xinxi_content" v-model="project_txt" placeholder="请输入详情" id="" cols="30"
						rows="10"></textarea>
				</view>
			</view>
			<!-- 产品名称 -->
			<view class="w-650 margin-top-30 d-flex align-items" v-if="radiovalue1 == 11">
				<view class="cs">产品名称</view>
				<view class="righttx">
					<input type="text" class="top-txt" placeholder="请输入名称" v-model="product_name" />
				</view>
			</view>
			<!-- 产品价格 -->
			<view class="w-650 margin-top-30 d-flex align-items" v-if="radiovalue1 == 11">
				<view class="cs">产品价格</view>
				<input type="text" class="mianji_w" placeholder="请输入价格" v-model="product_price" />
				<view class="cs">元</view>
			</view>
			<!-- 产品类别 -->
			<view class="w-650 d-flex align-items margin-top-30" v-if="radiovalue1 == 11">
				<view class="fabu_title">产品类别</view>
				<view class="righttx d-flex align-items" @click="show_chanpin = true">
					<view :class="chanpin_type == '请选择' ? 'top-txt_true' : 'choose_top-txt_true'">{{chanpin_type}}
					</view>
					<image class="qm" src="../static/right.png" mode="widthFix"></image>
				</view>
			</view>

			<!-- 产品图片 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 11">
				<view class="fabu_title">产品图片 <text class="zhutu">（第一张图为封面图）</text> </view>
				<view class="zhengjian">
					<u-upload width="127rpx" height="127rpx" :fileList="fileList6" @afterRead="afterRead"
						@delete="deletePic" name="6" multiple :maxCount="4">
						<image :src="src" class="shangchuanimg" v-if="avatar"></image>
						<image src="../static/upload.png" class="shangchuanimg" v-else></image>
					</u-upload>
				</view>
			</view>

			<!-- 产品规格 -->
			<view class="w-650 margin-top-30 d-flex align-items" v-if="radiovalue1 == 11">
				<view class="cs">产品规格</view>
				<view class="righttx">
					<input type="text" class="top-txt" placeholder="请输入产品规格" v-model="project_guige" />
				</view>
			</view>
			<!-- 产品详情 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 11">
				<view class="fabu_title">产品详情</view>
				<view class="zhengjian">
					<u-upload width="127rpx" height="127rpx" :fileList="fileList7" @afterRead="afterRead"
						@delete="deletePic" name="7" multiple :maxCount="4">
						<image :src="src" class="shangchuanimg" v-if="avatar"></image>
						<image src="../static/upload.png" class="shangchuanimg" v-else></image>
					</u-upload>
				</view>
			</view>

			<!-- 产品详情信息 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 11">
				<view class="">
					<textarea name="" class="xinxi_content" v-model="project_detail_info" placeholder="请输入详情信息" id=""
						cols="30" rows="10"></textarea>
				</view>
			</view>
			<!-- 平面图 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 9">
				<view class="fabu_title">平面图</view>
				<view class="zhengjian">
					<u-upload width="127rpx" height="127rpx" :fileList="fileList8" @afterRead="afterRead"
						@delete="deletePic" name="8" multiple :maxCount="4">
						<image :src="src" class="shangchuanimg" v-if="avatar"></image>
						<image src="../static/upload.png" class="shangchuanimg" v-else></image>
					</u-upload>
				</view>
			</view>
			<!-- 平面图详情信息 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 9">
				<view class="">
					<textarea name="" v-model="pingmiantu_info" class="xinxi_content" placeholder="请输入详情信息" id=""
						cols="30" rows="10"></textarea>
				</view>
			</view>
			<!-- 效果图 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 9">
				<view class="fabu_title">上传图片</view>
				<view class="zhengjian">
					<u-upload width="127rpx" height="127rpx" :fileList="fileList9" @afterRead="afterRead"
						@delete="deletePic" name="9" multiple :maxCount="4">
						<image :src="src" class="shangchuanimg" v-if="avatar"></image>
						<image src="../static/upload.png" class="shangchuanimg" v-else></image>
					</u-upload>
				</view>
			</view>
			<!-- 效果图详情信息 -->
			<view class="w-650 margin-top-30" v-if="radiovalue1 == 9">
				<view class="">
					<textarea name="" class="xinxi_content" v-model="xiaoguotu_info" placeholder="请输入详情信息" id=""
						cols="30" rows="10"></textarea>
				</view>
			</view>
			<view class="liji-btn">
				<u-button color="#FF6400" @click="all_submit" text="确认发布"></u-button>
			</view>
		</view>
		<!-- 选择省市县 -->
		<u-picker :show="showcity" ref="uPicker" @cancel="cancel" :columns="columns" @confirm="confirm"
			@change="changeHandler" keyName="t_name"></u-picker>
		<!-- 选择时间 -->
		<u-datetime-picker ref="datetimePicker" @confirm="confirm_time" @cancel="show_time = false" :show="show_time"
			v-model="nowtime" mode="date" :formatter="formatter"></u-datetime-picker>
		<!-- 请选择户型 -->
		<u-picker :show="showHuxing" @cancel="showHuxing = false" :columns="columns_huxing" @confirm="confirm_huxing"
			keyName="label"></u-picker>
		<!-- 请选择设计风格 -->
		<u-picker :show="showFengge" @cancel="showFengge = false" :columns="columns_fengge" @confirm="confirm_fengge"
			keyName="label"></u-picker>
		<!-- 请选择证件-->
		<u-picker :show="show_card" @cancel="show_card = false" :columns="columns_card" @confirm="confirm_card"
			keyName="label"></u-picker>
		<!-- 请选择工种 -->
		<view class="">
			<u-popup :show="show_gongzhong" mode="right" @close="show_gongzhong=false">
				<view class="top-choose">
					<view class="pop-top-nav">
						<u-navbar title="选择工种" @leftClick="show_gongzhong=false"></u-navbar>
					</view>
					<!-- 内容 -->
					<view class="d-flex">
						<scroll-view scroll-y="true" class="scroll-Y">
							<view :class="current == gongzhong_item.id ? 'left_info' : ''" :current="current"
								v-for="(gongzhong_item, index) in gongzhong_items" :key="index">
								<view class="gongzhong_list" @click="frist_gz(gongzhong_item)">
									<view :class="current == gongzhong_item.id ? 'gz-frist-xz' : 'gz-frist'">
										{{gongzhong_item.name}}
									</view>
								</view>
							</view>
						</scroll-view>


						<scroll-view scroll-y="true" class="scroll-shi">
							<view class="right_info" :current="next_current"
								v-for="(next_gz_item, index) in next_gz_items" :key="index">

								<view class="next_gz_list" @click="next_gz(next_gz_item)">
									<view :class="next_current == next_gz_item.id ? 'gz-frist-next' : 'gz-frist' ">
										{{next_gz_item.name}}
									</view>
								</view>
							</view>
						</scroll-view>
					</view>
				</view>
			</u-popup>
		</view>
		<!-- <u-picker :show="show_gongzhong" @cancel="show_gongzhong = false" :columns="columns_gongzhong"
			@confirm="confirm_gongzhong" keyName="label"></u-picker> -->
		<!-- 请选择产品类别-->
		<u-picker :show="show_chanpin" ref="uPicker1" @change="changeHandler_pro" @cancel="show_chanpin = false"
			:columns="columns_chanpin" @confirm="confirm_chanpin" immediateChange keyName="name"></u-picker>
		<!-- 请选择材料类别-->
		<u-picker :show="show_cailiao" @cancel="show_cailiao = false" :columns="columns_cailiao"
			@confirm="confirm_cailiao" keyName="label"></u-picker>
	</view>
</template>

<script>
	import {
		tree
	} from '@/api/citys.js'
	import {
		getinfotype,
		getzhengjian,
		getwuding,
		getjiegou,
		getgongzhong,
		getproducttype,
		gethuxing,
		getfengge,
		getcailiao,
		saveInfodata,
		getXinxiContent,
		getgongzhongtree
	} from '@/api/user.js'
	import {
		upFile
	} from '@/utils/url.js'
	export default {
		data() {
			return {
				radiolist1: [], //获取发布类型的列表
				radiovalue1: 0, //发布类型绑定的值
				showcity: false,
				adress: '请选择省/市/县',
				chanpin_type: '请选择', //产品类别
				chanpin_id: '', //产品类别id
				columns_chanpin: [], //产品类别数组
				cityname: '',
				cailiao_price: '',
				shiname: '',
				quname: '',
				quid: '',
				shiid: '',
				shengid: '',
				all_jieshao: '',
				miankuan: '', //面宽
				gongqi: '', //预计工期
				yusuan: '', //预算
				zaojia: '', //造价
				zhuangxiu_mianji: '', //装修面积
				mianji: '', //房屋面积
				jinshen: '', //进深
				need_num: '', //需要人数
				tingyuan: '', //扣除庭院
				cengshu: '', //地上层数
				lutai: '', //露台扣除
				phone: '', //电话
				fileList1: [], //证件图片
				fileList2: [], //案例主图
				fileList3: [], //材料主图
				info_content: '', //填写信息内容
				beizhu_txt: '', //备注信息
				biaoti_txt: '', //输入的标题
				fileList4: [], //详情
				detail_txt: '', //详情信息填写
				fileList5: [], //项目简介数组
				project_txt: '', //项目简介详情信息
				fileList6: [], //产品图片数组
				project_guige: '', //产品规格
				show_chanpin: false,
				product_price: '', //产品价格
				product_name: '', //产品名称
				fileList7: [], //产品详情数组
				project_detail_info: '', //产品详情信息
				fileList8: [], //平面图数组
				pingmiantu_info: '', //平面图详细信息
				fileList9: [], //效果图数组
				xiaoguotu_info: '', //效果图详细信息
				avatar: '',
				src: require('../static/upload.png'),

				columns: [],
				single: '', //绑定选择的时间
				show_card: false,
				card_txt: '请选择证件种类', //选择证件
				card_id: '', //选择证件id
				columns_card: [], //选择证件数组
				show_gongzhong: false,
				gongzhong: '请选择工种',
				gongzhong_id: '', //选择工种id
				current: 0, //选择工种当前值
				gongzhong_items: [], //选择工种数组
				next_current: 0,
				next_gz_items: [], //工种下一级

				showFengge: false,
				sheji_txt: '请选择', //选择设计风格
				sheji_id: '', //设计风格id
				columns_fengge: [], //设计风格数组
				show_cailiao: false,
				cailiao: '请选择', //材料类别选择
				cailiao_id: '', //材料类别id
				columns_cailiao: [], //材料类别数组
				value_wuding: 0,
				wuding_range: [], //屋顶形式数组
				value_jiegou: 0,
				jiegou_range: [], //结构形式数组
				dixiashi_value: 0,
				dixiashi_range: [{
						value: 0,
						text: "不确定"
					}, {
						value: 1,
						text: "有"
					},
					{
						value: 2,
						text: "无"
					}
				],
				showHuxing: false,
				huxing_id: '', //户型id
				huxing_txt: '请选择', //选择户型
				columns_huxing: [], //选择户型数组
				show_time: false,
				info_type_id: '',
				content_id: '',
				option: {},
				datetimesingle: '',
			}
		},
		async onLoad(option) {
			this.option = option
			this.info_type_id = option.id
			this.content_id = option.content_id
			await this.getProvinces()
			this.get_info_type()
			this.get_wuding_list()
			this.get_jiegou_list()
			this.get_gongzhong_list()
			this.get_huxing_list()
			this.get_chanpin_list()
			this.get_fengge_list()
			this.get_cailiao_list()
			this.get_card_list()
			this.get_huixian_info()
		},
		watch: {
			datetimesingle(newval) {
				console.log('单选:', this.datetimesingle);
			}
		},

		onReady() {
			// 微信小程序需要用此写法
			this.$refs.datetimePicker.setFormatter(this.formatter)
		},

		methods: {
			change_time(e) {
				console.log('change_time事件:', e);
				this.single = e
			},
			// 获取文章填写的回显内容
			get_huixian_info() {
				var data = {
					id: this.content_id
				}
				getXinxiContent(data).then(res => {
					console.log("获取回显的内容", res);
					if (res.code == 1) {
						let content_info = res.data.content_info
						// this.radiovalue1 = res.data.content_info.infotype_id
						this.shengid = res.data.content_info.province
						this.shiid = res.data.content_info.city
						this.quid = res.data.content_info.area
						this.adress = content_info.provincename + '/' + content_info.cityname + '/' + content_info
							.areaname
						this.phone = res.data.content_info.phone
						this.biaoti_txt = content_info.title
						if (res.data.content_info.infotype_id == 1) {
							this.miankuan = res.data.content_info.diyinfo.miankuan
							this.jinshen = res.data.content_info.diyinfo.jinshen
							this.tingyuan = res.data.content_info.diyinfo.tingyuan
							this.lutai = res.data.content_info.diyinfo.yangtai
							this.value_jiegou = res.data.content_info.diyinfo.jiegou_id
							this.value_wuding = res.data.content_info.diyinfo.wuding_id
							this.cengshu = res.data.content_info.diyinfo.ceng
							this.dixiashi_value = res.data.content_info.diyinfo.dixiashi
							this.info_content = res.data.content_info.diyinfo.content
							this.adress = res.data.content_info.provincename + '/' + res.data.content_info
								.cityname + '/' + res.data.content_info.areaname
						}
						if (res.data.content_info.infotype_id == 2) {
							this.zhuangxiu_mianji = content_info.diyinfo.mianji
							this.single = content_info.diyinfo.zxtime_text
							this.beizhu_txt = content_info.diyinfo.content
							console.log("7777777777777", this.single, content_info.diyinfo.zxtime_text);
						}
						if (res.data.content_info.infotype_id == 3) {
							this.next_current = content_info.diyinfo.gongzhong_id
							this.gongzhong = content_info.diyinfo.gongzhongname
							this.need_num = content_info.diyinfo.renshu
							this.gongqi = content_info.diyinfo.gongqi
							this.info_content = content_info.diyinfo.content
						}
						if (res.data.content_info.infotype_id == 4) {
							this.card_id = content_info.diyinfo.zhengjian_id
							this.card_txt = content_info.diyinfo.zhengjianname
							let a = []
							let b = content_info.diyinfo.zhengjian_images.split(',')
							for (let s in content_info.diyinfo.zhengjian_images_url) {
								a.push({
									url: content_info.diyinfo.zhengjian_images_url[s],
									url_noyuming: b[s]
								})
							}
							this.fileList1 = a
							this.info_content = content_info.diyinfo.content
						}
						if (res.data.content_info.infotype_id == 5) {
							this.miankuan = content_info.diyinfo.miankuan
							this.jinshen = content_info.diyinfo.jinshen
							this.mianji = content_info.diyinfo.mianji
							this.zaojia = content_info.diyinfo.price
							let a = []
							let b = content_info.diyinfo.zhutu.split(',')
							for (let s in content_info.diyinfo.zhutu_url) {
								a.push({
									url: content_info.diyinfo.zhutu_url[s],
									url_noyuming: b[s]
								})
							}
							this.fileList2 = a
							this.biaoti_txt = content_info.title
							this.detail_txt = content_info.diyinfo.content
							let c = []
							let d = content_info.diyinfo.content_images.split(',')
							for (let s in content_info.diyinfo.content_images_url) {
								c.push({
									url: content_info.diyinfo.content_images_url[s],
									url_noyuming: d[s]
								})
							}
							this.fileList4 = c
						}
						// 设计案例
						if (res.data.content_info.infotype_id == 6) {
							this.huxing_id = content_info.diyinfo.huxing_id
							this.huxing_txt = content_info.diyinfo.huxingname
							this.sheji_txt = content_info.diyinfo.fenggename
							this.sheji_id = content_info.diyinfo.fengge_id
							this.mianji = content_info.diyinfo.mianji
							this.yusuan = content_info.diyinfo.price
							let c = []
							let d = content_info.diyinfo.zhutu_images.split(',')
							for (let s in content_info.diyinfo.zhutu_images_url) {
								c.push({
									url: content_info.diyinfo.zhutu_images_url[s],
									url_noyuming: d[s]
								})
							}
							this.fileList2 = c

							let a = []
							let b = content_info.diyinfo.content_images.split(',')
							for (let s in content_info.diyinfo.content_images_url) {
								a.push({
									url: content_info.diyinfo.content_images_url[s],
									url_noyuming: b[s]
								})
							}
							this.fileList4 = a
							this.detail_txt = content_info.diyinfo.content
						}
						// 建房案例
						if (res.data.content_info.infotype_id == 7) {
							this.huxing_id = content_info.diyinfo.huxing_id
							this.huxing_txt = content_info.diyinfo.huxingname
							this.miankuan = content_info.diyinfo.miankuan
							this.sheji_txt = content_info.diyinfo.fenggename
							this.sheji_id = content_info.diyinfo.fengge_id
							this.jinshen = content_info.diyinfo.jinshen
							this.value_jiegou = content_info.diyinfo.jiegou_id
							this.value_wuding = content_info.diyinfo.wuding_id
							this.mianji = content_info.diyinfo.mianji
							this.yusuan = content_info.diyinfo.yusuan
							this.cengshu = content_info.diyinfo.ceng
							this.dixiashi_value = content_info.diyinfo.dixiashi
							let c = []
							let d = content_info.diyinfo.anli_images.split(',')
							for (let s in content_info.diyinfo.anli_images_url) {
								c.push({
									url: content_info.diyinfo.anli_images_url[s],
									url_noyuming: d[s]
								})
							}
							this.fileList2 = c

							let a = []
							let b = content_info.diyinfo.content_images.split(',')
							for (let s in content_info.diyinfo.content_images_url) {
								a.push({
									url: content_info.diyinfo.content_images_url[s],
									url_noyuming: b[s]
								})
							}
							this.fileList4 = a
							this.detail_txt = content_info.diyinfo.content
						}
						if (res.data.content_info.infotype_id == 8) {
							this.huxing_id = content_info.diyinfo.huxing_id
							this.mianji = content_info.diyinfo.mianji
							this.sheji_txt = content_info.diyinfo.fenggename
							this.sheji_id = content_info.diyinfo.fengge_id
							this.yusuan = content_info.diyinfo.yusuan
							this.huxing_txt = content_info.diyinfo.huxingname
							let a = []
							let b = content_info.diyinfo.zhutu_images.split(',')
							for (let s in content_info.diyinfo.zhutu_images_url) {
								a.push({
									url: content_info.diyinfo.zhutu_images_url[s],
									url_noyuming: b[s]
								})
							}
							this.fileList2 = a
							this.biaoti_txt = content_info.title
							let c = []
							let d = content_info.diyinfo.content_images.split(',')
							for (let s in content_info.diyinfo.content_images_url) {
								c.push({
									url: content_info.diyinfo.content_images_url[s],
									url_noyuming: d[s]
								})
							}
							this.fileList4 = c
							this.detail_txt = content_info.diyinfo.content
						}
						if (res.data.content_info.infotype_id == 9) {
							this.huxing_id = content_info.diyinfo.huxing_id
							this.huxing_txt = content_info.diyinfo.huxingname
							this.sheji_txt = content_info.diyinfo.fenggename
							this.sheji_id = content_info.diyinfo.fengge_id
							this.mianji = content_info.diyinfo.mianji
							this.zaojia = content_info.diyinfo.zaojia
							this.value_jiegou = content_info.diyinfo.jiegou_id
							this.value_wuding = content_info.diyinfo.wuding_id
							this.cengshu = content_info.diyinfo.ceng
							this.dixiashi_value = content_info.diyinfo.dixiashi
							this.miankuan = content_info.diyinfo.miankuan
							this.jinshen = content_info.diyinfo.jinshen
							let a = []
							let b = content_info.diyinfo.zhutu_images.split(',')
							for (let s in content_info.diyinfo.zhutu_images_url) {
								a.push({
									url: content_info.diyinfo.zhutu_images_url[s],
									url_noyuming: b[s]
								})
							}
							this.fileList2 = a

							let c = []
							let d = content_info.diyinfo.xiangmu_images.split(',')
							for (let s in content_info.diyinfo.xiangmu_images_url) {
								c.push({
									url: content_info.diyinfo.xiangmu_images_url[s],
									url_noyuming: d[s]
								})
							}
							this.fileList5 = c
							this.project_txt = content_info.diyinfo.xiangmu

							let e = []
							let f = content_info.diyinfo.pingmian_images.split(',')
							for (let s in content_info.diyinfo.pingmian_images_url) {
								e.push({
									url: content_info.diyinfo.pingmian_images_url[s],
									url_noyuming: f[s]
								})
							}
							this.fileList8 = e
							this.pingmiantu_info = content_info.diyinfo.pingmian

							let g = []
							let h = content_info.diyinfo.xiaoguo_images.split(',')
							for (let s in content_info.diyinfo.xiaoguo_images_url) {
								g.push({
									url: content_info.diyinfo.xiaoguo_images_url[s],
									url_noyuming: h[s]
								})
							}
							this.fileList9 = g
							this.xiaoguotu_info = content_info.diyinfo.xiaoguo
						}
						if (res.data.content_info.infotype_id == 10) {
							this.cailiao_id = content_info.diyinfo.cailiaotype_id
							this.cailiao = content_info.diyinfo.cailiaotypename
							this.cailiao_price = content_info.diyinfo.price
							let g = []
							let h = content_info.diyinfo.zhutu_images.split(',')
							for (let s in content_info.diyinfo.zhutu_images_url) {
								g.push({
									url: content_info.diyinfo.zhutu_images_url[s],
									url_noyuming: h[s]
								})
							}
							this.fileList3 = g
							let a = []
							let b = content_info.diyinfo.content_images.split(',')
							for (let s in content_info.diyinfo.content_images_url) {
								a.push({
									url: content_info.diyinfo.content_images_url[s],
									url_noyuming: b[s]
								})
							}
							this.fileList4 = a
							this.detail_txt = content_info.diyinfo.content
						}
						if (res.data.content_info.infotype_id == 11) {
							this.product_name = content_info.diyinfo.product_name
							this.chanpin_id = content_info.diyinfo.producttype_id
							this.chanpin_next_id = content_info.diyinfo.producttype_pid
							this.chanpin_type = content_info.diyinfo.producttypename + '/' + content_info.diyinfo
								.product_name
							this.product_price = content_info.diyinfo.price
							let a = []
							let b = content_info.diyinfo.product_images.split(',')
							for (let s in content_info.diyinfo.product_images_url) {
								a.push({
									url: content_info.diyinfo.product_images_url[s],
									url_noyuming: b[s]
								})
							}
							this.fileList6 = a
							this.project_guige = content_info.diyinfo.product_guige
							let c = []
							let d = content_info.diyinfo.content_images.split(',')
							for (let s in content_info.diyinfo.content_images_url) {
								c.push({
									url: content_info.diyinfo.content_images_url[s],
									url_noyuming: d[s]
								})
							}
							this.fileList7 = c
							this.project_detail_info = content_info.diyinfo.content
						}
						if (res.data.content_info.infotype_id == 12) {
							let a = []
							let b = content_info.diyinfo.content_images.split(',')
							for (let s in content_info.diyinfo.content_images_url) {
								a.push({
									url: content_info.diyinfo.content_images_url[s],
									url_noyuming: b[s]
								})
							}
							this.fileList4 = a
							this.detail_txt = content_info.diyinfo.content
						}
					}
				})
			},
			// 获取发布信息的发布类型
			get_info_type() {
				var data = {
					group_id: this.info_type_id,
				}
				getinfotype(data).then(res => {
					console.log("获取发布类型的信息类型", res);
					if (res.code == 1) {
						this.radiolist1 = res.data.infotypelist;
						if (this.option.infotype_id) {
							this.radiovalue1 = parseInt(this.option.infotype_id)
						}

						if (this.radiovalue1 == 0) {
							this.radiovalue1 = parseInt(res.data.infotypelist[0].id)
						}
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				})
			},

			// 获取屋顶列表
			get_wuding_list() {
				getwuding({}).then(res => {
					console.log("获取屋顶形式", res);
					if (res.code == 1) {
						let b = []
						for (let s of res.data.wuding_list) {
							b.push({
								value: s.id,
								text: s.name
							})
						}
						this.wuding_range = b
					}
				})
			},
			wuding_change(e) {
				console.log("这是屋顶选择的", e);
				this.value_wuding = e
			},
			// 获取结构形式列表
			get_jiegou_list() {
				getjiegou({}).then(res => {
					console.log("获取屋顶形式", res);
					if (res.code == 1) {
						let c = []
						for (let s of res.data.jiegou_list) {
							c.push({
								value: s.id,
								text: s.name
							})
						}
						this.jiegou_range = c
					}
				})
			},
			jiegou_change(e) {
				console.log("选择结构形式", e);
				this.value_jiegou = e
			},
			// 获取证件列表
			get_card_list() {
				getzhengjian({}).then(res => {
					console.log("获取屋顶形式", res);
					if (res.code == 1) {
						let h = []
						for (let s of res.data.zhengjian_list) {
							h.push({
								id: s.id,
								label: s.name
							})
						}
						this.columns_card = [h]
					}
				})
			},
			confirm_card(e) {
				console.log("需要工种列表", e);
				this.card_txt = e.value[0].label
				this.card_id = e.value[0].id
				this.show_card = false
			},
			// 获取工种列表
			get_gongzhong_list() {
				getgongzhongtree({}).then(res => {
					console.log("获取屋顶形式", res);
					if (res.code == 1) {
						this.gongzhong_items = res.data
					}
				})
			},
			// 点开第一级工种列表
			frist_gz(e) {
				console.log("点击工种列表", e);
				this.current = e.id
				if (!e.children) {
					this.next_gz_items = []
				} else {
					let a = [];
					for (let s of e.children) {
						a.push({
							name: s.name,
							id: s.id,
						})
					}
					this.next_gz_items = a
				}
			},
			// 选择工种下一级
			next_gz(e) {
				this.next_current = e.id
				this.gongzhong = e.name
				setTimeout(() => {
					this.show_gongzhong = false
				}, 500)
			},

			// 获取户型列表
			get_huxing_list() {
				gethuxing({}).then(res => {
					console.log("获取户型列表", res);
					if (res.code == 1) {
						let d = []
						for (let s of res.data.huxing_list) {
							d.push({
								id: s.id,
								label: s.name
							})
						}
						this.columns_huxing = [d]
					}
				})
			},
			choose_huxing() {
				this.showHuxing = true
			},
			confirm_huxing(e) {
				console.log("选择户型", e);
				this.huxing_txt = e.value[0].label
				this.huxing_id = e.value[0].id
				this.showHuxing = false
			},

			// 获取设计风格
			get_fengge_list() {
				getfengge({}).then(res => {
					console.log("获取户型列表", res);
					if (res.code == 1) {
						let f = []
						for (let s of res.data.fengge_list) {
							f.push({
								id: s.id,
								label: s.name
							})
						}
						this.columns_fengge = [f]
					}
				})
			},
			confirm_fengge(e) {
				console.log("需要工种列表", e);
				this.sheji_txt = e.value[0].label
				this.sheji_id = e.value[0].id
				this.showFengge = false
			},
			// 获取材料类别
			get_cailiao_list() {
				getcailiao({}).then(res => {
					console.log("获取户型列表", res);
					if (res.code == 1) {
						let g = []
						for (let s of res.data.cailiao_list) {
							g.push({
								id: s.id,
								label: s.name
							})
						}
						this.columns_cailiao = [g]
					}
				})
			},
			confirm_cailiao(e) {
				console.log("需要工种列表", e);
				this.cailiao = e.value[0].label
				this.cailiao_id = e.value[0].id
				this.show_cailiao = false
			},
			dixiashi_change(e) {
				console.log("选择地下室", e);
				this.dixiashi_value = e
			},
			formatter(type, value) {
				if (type === 'year') {
					return `${value}年`
				}
				if (type === 'month') {
					return `${value}月`
				}
				if (type === 'day') {
					return `${value}日`
				}
				return value
			},
			// 选择装修时间
			chooseTime() {
				this.show_time = true
			},
			confirm_time(e) {
				console.log("目前选择的时间是", e);
				this.zhuangxiu_time = e.value
				this.nowtime = e.value
				this.show_time = false
			},

			go_black() {
				uni.navigateBack({
					delta: 1
				})
			},
			radioChange(e) {
				console.log("选择了第几个", e);
				this.radiovalue1 = this.radiolist1[e].id
			},
			goHome() {
				uni.switchTab({
					url: '/pages/index/index'
				})
			},
			changeHandler_pro(e) {
				const {
					columnIndex,
					value,
					values, // values为当前变化列的数组内容
					index,
					// 微信小程序无法将picker实例传出来，只能通过ref操作
					picker = this.$refs.uPicker1
				} = e
				// 当第一列值发生变化时，变化第二列(后一列)对应的选项
				if (columnIndex === 0) {
					// picker为选择器this实例，变化第二列对应的选项
					console.log("7777777777", index);
					picker.setColumnValues(1, this.columns_chanpin[0][index].children)
					// picker.setColumnValues(1, this.columns_chanpin[index])
				}
			},
			// 获取产品类型列表
			get_chanpin_list() {
				getproducttype({}).then(res => {
					console.log("获取户型列表", res);
					if (res.code == 1) {
						this.columns_chanpin[0] = res.data.producttype_list
						this.columns_chanpin[1] = res.data.producttype_list[0].children
					}
				})
			},
			confirm_chanpin(e) {
				console.log("需要工种列表", e);
				this.chanpin_type = e.value[0].name + '/' + e.value[1].name
				this.chanpin_id = e.value[0].id
				this.chanpin_next_id = e.value[1].id
				this.show_chanpin = false
			},
			chooseCity() {
				console.log("eeeee", this.columns);
				this.showcity = true
			},
			// 省市区
			changeHandler(e) {
				const {
					columnIndex,
					value,
					values,
					index,
					indexs,
					picker = this.$refs.uPicker
				} = e
				if (columnIndex === 0) {
					picker.setColumnValues(1, this.columns[0][index].children)
					picker.setColumnValues(1, this.columns[0][index].children)
					picker.setColumnValues(2, this.columns[0][index].children[0].children)
				}
				if (columnIndex === 1) {
					console.log(e, indexs);
					// picker为选择器this实例，变化第二列对应的选项
					picker.setColumnValues(2, this.columns[0][indexs[0]].children[indexs[1]].children)
				}
				console.log("columnIndex", columnIndex);
			},
			confirm(e) {
				this.cityname = e.value[0].name
				this.shengid = e.value[0].id
				this.shiname = e.value[1].name
				this.shiid = e.value[1].id
				this.quname = e.value[2].name
				this.quid = e.value[2].id
				this.adress = this.cityname + '/' + this.shiname + '/' + this.quname
				this.showcity = false
			},
			cancel(e) {
				this.showcity = false
			},
			// 获取省市县接口数据
			async getProvinces() {
				var data = {
					pid: 0
				}
				await tree(data).then(res => {
					console.log("选择了第几个", res);
					if (res.code == 1) {
						this.columns[0] = res.data
						this.columns[1] = res.data[0].children
						this.columns[2] = res.data[0].children[0].children
					}

				})
			},
			// 删除图片
			deletePic(event) {
				this[`fileList${event.name}`].splice(event.index, 1)
			},
			// 新增图片
			async afterRead(event) {
				var url = event.file[0].url
				// 当设置 multiple 为 true 时, file 为数组格式，否则为对象格式
				let lists = [].concat(event.file)
				let fileListLen = this[`fileList${event.name}`].length
				lists.map((item) => {
					this[`fileList${event.name}`].push({
						...item,
						status: 'uploading',
						message: '上传中'
					})
				})
				console.log("00000000000000", lists);
				for (let i = 0; i < lists.length; i++) {
					const result = await this.uploadFilePromise(lists[i].url)
					let item = this[`fileList${event.name}`][fileListLen]
					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
						status: 'success',
						message: '',
						fullurl: result.fullurl,
						url_noyuming: result.url
					}))
					fileListLen++
				}
			},
			uploadFilePromise(url) {
				var that = this
				console.log("url有没有值", url);
				return new Promise((resolve, reject) => {
					let a = uni.uploadFile({
						url: upFile,
						filePath: url,
						name: 'file',
						formData: {
							user: 'test',
							token: uni.getStorageSync('token')
						},
						success: (res) => {
							console.log("s111111111111111______", res);
							var data = JSON.parse(res.data);
							resolve(data.data)
						}
					});
				})
			},
			all_submit() {
				let that = this
				//证件图片
				let zhengjian_arr = []
				for (let s of that.fileList1) {
					zhengjian_arr.push(s.url_noyuming)
				}
				//案例主图
				let anli_arr = []
				for (let s of that.fileList2) {
					anli_arr.push(s.url_noyuming)
				}
				//材料主图
				let cailiao_arr = []
				for (let s of that.fileList3) {
					cailiao_arr.push(s.url_noyuming)
				}
				//详情
				let detail_arr = []
				for (let s of that.fileList4) {
					detail_arr.push(s.url_noyuming)
				}
				//项目简介数组
				let pro_arr = []
				for (let s of that.fileList5) {
					pro_arr.push(s.url_noyuming)
				}
				//产品图片数组
				let project_arr = []
				for (let s of that.fileList6) {
					project_arr.push(s.url_noyuming)
				}
				//产品详情数组
				let project_detail_arr = []
				for (let s of that.fileList7) {
					project_detail_arr.push(s.url_noyuming)
				}
				//平面图数组
				let pingmian_arr = []
				for (let s of that.fileList8) {
					pingmian_arr.push(s.url_noyuming)
				}
				//效果图数组
				let xiaoguo_arr = []
				for (let s of that.fileList9) {
					xiaoguo_arr.push(s.url_noyuming)
				}
				var data = {
					infotype_id: that.radiovalue1,
					province: that.shengid,
					city: that.shiid,
					area: that.quid,
					phone: that.phone,
					title: that.biaoti_txt,
					group_id: that.info_type_id,
				}
				if (that.content_id) {
					data = Object.assign(data, {
						id: that.content_id,
					})
				}

				if (that.radiovalue1 == 1) {
					//  建房信息 
					data = Object.assign(data, {
						miankuan: that.miankuan,
						jinshen: that.jinshen,
						tingyuan: that.tingyuan,
						yangtai: that.lutai,
						jiegou_id: that.value_jiegou,
						wuding_id: that.value_wuding,
						ceng: that.cengshu,
						dixiashi: that.dixiashi_value,
						content: that.info_content,
					})
				}
				if (that.radiovalue1 == 2) {
					// 装修信息
					data = Object.assign(data, {
						mianji: that.zhuangxiu_mianji,
						zxtime: that.single,
						content: that.beizhu_txt
					})
				}
				if (that.radiovalue1 == 3) {
					// 雇工信息
					data = Object.assign(data, {
						gongzhong_id: that.next_current,
						renshu: that.need_num,
						gongqi: that.gongqi,
						content: that.info_content,
					})
				}
				if (that.radiovalue1 == 4) {
					// 证件挂靠信息
					data = Object.assign(data, {
						zhengjian_id: that.card_id,
						zhengjian_images: zhengjian_arr.join(','),
						content: that.info_content,
					})
				}
				if (that.radiovalue1 == 5) {
					// 施工案例
					data = Object.assign(data, {
						miankuan: that.miankuan,
						jinshen: that.jinshen,
						mianji: that.mianji,
						price: that.zaojia,
						zhutu: anli_arr.join(','),
						content_images: detail_arr.join(','),
						content: that.detail_txt,
					})
				}
				if (that.radiovalue1 == 6) {
					// 设计案例
					data = Object.assign(data, {
						huxing_id: that.huxing_id,
						fengge_id: that.sheji_id,
						mianji: that.mianji,
						price: that.yusuan,
						zhutu_images: anli_arr.join(','),
						content_images: detail_arr.join(','),
						content: that.detail_txt,
					})
				}
				if (that.radiovalue1 == 7) {
					// 建房案例
					data = Object.assign(data, {
						huxing_id: that.huxing_id,
						miankuan: that.miankuan,
						jinshen: that.jinshen,
						fengge_id: that.sheji_id,
						jiegou_id: that.value_jiegou,
						wuding_id: that.value_wuding,
						mianji: that.mianji,
						yusuan: that.yusuan,
						ceng: that.cengshu,
						dixiashi: that.dixiashi_value,
						anli_images: anli_arr.join(','),
						content_images: detail_arr.join(','),
						content: that.detail_txt,
					})
				}
				if (that.radiovalue1 == 8) {
					// 装修案例
					data = Object.assign(data, {
						huxing_id: that.huxing_id,
						mianji: that.mianji,
						yusuan: that.yusuan,
						fengge_id: that.sheji_id,
						zhutu_images: anli_arr.join(','),
						content_images: detail_arr.join(','),
						content: that.detail_txt,
					})
				}
				if (that.radiovalue1 == 9) {
					// 图纸信息
					data = Object.assign(data, {
						huxing_id: that.huxing_id,
						fengge_id: that.sheji_id,
						mianji: that.mianji,
						miankuan: that.miankuan,
						jinshen: that.jinshen,
						zaojia: that.zaojia,
						jiegou_id: that.value_jiegou,
						wuding_id: that.value_wuding,
						ceng: that.cengshu,
						dixiashi: that.dixiashi_value,
						zhutu_images: anli_arr.join(','),
						xiangmu_images: pro_arr.join(','),
						xiangmu: that.project_txt,
						pingmian_images: pingmian_arr.join(','),
						pingmian: that.pingmiantu_info,
						xiaoguo_images: xiaoguo_arr.join(','),
						xiaoguo: that.xiaoguotu_info,
					})
					if (!data.pingmian_images) {
						uni.showToast({
							title: '请上传平面图图片',
							icon: 'none'
						})
						return
					}
				}
				if (that.radiovalue1 == 10) {
					// 材料信息
					data = Object.assign(data, {
						cailiaotype_id: that.cailiao_id,
						zhutu_images: cailiao_arr.join(','),
						content_images: detail_arr.join(','),
						content: that.detail_txt,
						price: that.cailiao_price,

					})
				}
				if (that.radiovalue1 == 11) {
					// 产品信息
					data = Object.assign(data, {
						product_name: that.product_name,
						producttype_id: that.chanpin_id,
						producttype_pid: that.chanpin_next_id,
						price: that.product_price,
						product_images: project_arr.join(','),
						product_guige: that.project_guige,
						content_images: project_detail_arr.join(','),
						content: that.project_detail_info,
					})
				}
				if (that.radiovalue1 == 12) {
					// 行业资讯
					data = Object.assign(data, {
						content_images: detail_arr.join(','),
						content: that.detail_txt,
					})
				}
				saveInfodata(data).then(res => {
					console.log("提交保存得数据为", res);
					if (res.code == 1) {
						uni.showToast({
							title: '发布成功！',
							icon: 'none'
						})
						setTimeout(() => {
							if (typeof that.$util.prePage().get_jianfang_list == 'function') {
								that.$util.prePage().get_jianfang_list()
							}
							uni.navigateBack({
								delta: 1
							})
						}, 500)
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				})
			},
		}
	}
</script>

<style>
	/* 选择工种 start */
	.scroll-shi {
		height: calc(100vh - 100rpx);
		width: 60%;
	}

	.scroll-Y {
		height: calc(100vh - 100rpx);
		width: 40%;
		background-color: #F7F8FA;
	}

	.scroll-shi-width {
		width: 85%;
	}

	.next_gz_list {
		width: 85%;
		margin: auto;
	}

	.right_info {}

	.gz-frist-next {
		font-size: 28rpx;
		color: #FF6400;
		text-align: center;
		font-weight: 600;
		line-height: 70rpx;
		border-bottom: 1px solid #eee;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}

	.gz-frist-xz {
		font-size: 28rpx;
		color: #fff;
		text-align: center;
		line-height: 70rpx;
		font-weight: 600;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}

	.gz-frist {
		font-size: 28rpx;
		color: #333;
		text-align: center;
		line-height: 70rpx;
		border-bottom: 1px solid #eee;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}

	.gongzhong_list {
		width: 85%;
		margin: auto;
	}

	.left_info {
		background-color: #FF6400;
	}

	.pop-top-nav {
		width: 750rpx;
		background-color: #fff;
		height: 177rpx;
		border-bottom: 1px solid #eee;
	}

	.top-choose {
		width: 750rpx;
	}

	/* 选择工种end */
	/deep/.u-radio-group--row {
		flex-wrap: wrap;
	}

	.radio_list {
		width: 530rpx;
	}

	.zhutu {
		font-size: 24rpx;
		color: #999999;
	}

	.zhengjian {
		margin-top: 20rpx;
	}

	.shangchuanimg {
		width: 127rpx;
		height: 127rpx;
		border: 1px solid #eee;
		display: block;
		margin: auto;
		overflow: hidden;
	}

	.liji-btn {
		width: 630rpx;
		margin: auto;
		margin-top: 30rpx;
	}

	.xinxi_content {
		width: 590rpx;
		height: 160rpx;
		background-color: #F5F5F5;
		border-radius: 12rpx;
		margin: auto;
		font-size: 24rpx;
		color: #000000;
		margin-top: 30rpx;
		padding: 20rpx;
	}

	.jiegou {
		width: 180rpx;
		margin: 0 16rpx;
	}

	.miankuan {
		width: 120rpx;
		height: 64rpx;
		font-size: 26rpx;
		color: #333;
		border-radius: 8rpx;
		border: 2rpx solid #EEEEEE;
		opacity: 1;
		margin: 0 16rpx;
		text-align: center;
	}

	.qm {
		width: 18rpx;
		display: block;
		padding: 10rpx 20rpx;
		margin-left: 10rpx;
	}

	.txt-phone {
		height: 64rpx;
		font-size: 24rpx;
		color: #333333;
		padding-left: 10rpx;
	}

	.top-txt_true,
	.choose_top-txt_true {
		width: 501rpx;
		font-size: 24rpx;
		color: #999999;
		text-align: right;
		padding-left: 10rpx;
	}

	.choose_top-txt_true {
		color: #333;
	}

	.mianji_w {
		width: 450rpx;
		height: 64rpx;
		font-size: 24rpx;
		padding-left: 10rpx;
		border-radius: 8rpx;
		border: 2rpx solid #EEEEEE;
		opacity: 1;
		margin-left: 16rpx;
		margin-right: 15rpx;
	}

	.top-txt {
		height: 64rpx;
		font-size: 24rpx;
		color: #333333;
		padding-left: 10rpx;
	}

	.cs {
		font-size: 28rpx;
		color: #333333;
	}

	.righttx {
		width: 501rpx;
		height: 64rpx;
		border-radius: 8rpx;
		border: 2rpx solid #EEEEEE;
		opacity: 1;
		margin-left: 16rpx;
	}

	.fabu_title {
		font-size: 28rpx;
		color: #333333;
	}

	.content-list {
		width: 690rpx;
		background: #FFFFFF;
		border-radius: 10rpx;
		padding: 30rpx 0;
	}

	/* 顶部自定义nav */
	.info-bg-title {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.right {
		width: 174rpx;
	}

	.title {
		font-size: 34rpx;
		font-weight: normal;
		text-align: center;
		color: #FFFFFF;
	}

	.left-balck {
		width: 174rpx;
		height: 64rpx;
		border-radius: 32rpx;
		justify-content: space-around;
		border: 1px solid rgb(255, 255, 255, 0.6);
	}

	.line {
		width: 1rpx;
		height: 37rpx;
		opacity: 0.6;
		background: #FFFFFF;
	}

	.go_index {
		width: 40rpx;
		display: block;
	}

	.go_back {
		width: 40rpx;
		display: block;
	}

	.info_top {
		width: 750rpx;
		height: 434rpx;
		background: url('https://lianfan.nccpu.cn/image/info_bg.png') no-repeat;
		background-size: 100% auto;
	}

	/* end */
	page {
		background-color: #F7F8FB;
	}
</style>